/*
 * util.c
 *
 *  Created on: 2023年7月12日
 *      Author: DELL
 */
#include "stdio.h"



/*!
 * brief XOrs two data lines
 *
 * param [IN]  line1  1st Data line to be XORed
 * param [IN]  line2  2nd Data line to be XORed
 * param [IN]  size   Number of elements in line1
 *
 * \param [OUT] result XOR( line1, line2 ) result stored in line1
 */
void XorDataLine( uint8_t *line1, uint8_t *line2, int32_t size )
{
    for( int32_t i = 0; i < size; i++ )
    {
        line1[i] = line1[i] ^ line2[i];
    }
}

void orDataLine( uint8_t *line1, uint8_t *line2, int32_t size )
{
    for( int32_t i = 0; i < size; i++ )
    {
        line1[i] = line1[i] | line2[i];
    }
}
